<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Dom</title>
		<script src="../../py/system.js" type="text/javascript"></script>
		<script src="../../py/system/dom/element.js" type="text/javascript"></script>
		
		<script src="../../common/project/project.js" type="text/javascript"></script>
		<script src="../../common/assets/scripts/default.js" type="text/javascript"></script>
		<script src="../../common/assets/scripts/debug.js" type="text/javascript"></script>
	</head>
	<body> 
		<div style="background: yellow;" id="a">
			<div style="background: red; width:200px;" id="aa">id=aa<div style="background: black; color:white" id="aba">id=aba</div></div>
			<div style="background: green;" id="ab">id=ab<input type="button" name="button" id="button" value="子控件" /></div>
		<a href="../" id="ac"></a>
		</div>
		<hr>
		<script>
			var a = $('a'), aa = $('aa'), aba = $('aba'), ab = $('ab');
			var fns = [
				'Style',
				["Element.prototype.setStyle", function(){ return a.setStyle('font-size', 14); }],
				["Element.prototype.getStyle", function(){ return a.getStyle('font-size'); }],
				["Element.prototype.setOpacity", function(){ return a.setOpacity(0.8); }],
				["Element.prototype.getOpacity", function(){ return a.getOpacity(); }],
				'Class',
				["Element.prototype.hasClass", function(){ return a.hasClass('light'); }],
				["Element.prototype.addClass", function(){ return a.addClass('light'); }],
				["Element.prototype.removeClass", function(){ return a.removeClass('light'); }],
				["Element.prototype.toggleClass", function(){ return a.toggleClass('light'); }],
				'Attr',
				["Element.prototype.setAttr", function(){ return a.setAttr('innerText', '12121'); }],
				["Element.prototype.getAttr", function(){ return a.getAttr('innerText'); }],
				["Element.prototype.set", function(){ return a.set({'innerHTML': 'cv'}); }],
				["Element.prototype.getText", function(){ return a.getText(); }],
				["Element.prototype.setText", function(){ return a.setText('sssas'); }],
				'Rich',
				["Element.prototype.show", function(){ return a.show(); }],
				["Element.prototype.hide", function(){ return a.hide(); }],
				["Element.prototype.animate", function(){ return a.animate({height: 2}); }],
				["Element.prototype.setUnselectable", function(){ return a.setUnselectable(); }],
				["Element.prototype.bringToFront", function(){ return a.bringToFront(); }],
				["Element.prototype.toggle", function(){ return a.toggle(); }]
			];
		</script>
	</body>
</html>